package com.yudaxian.springboothutool;

import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.Month;
import cn.hutool.core.lang.Console;
import cn.hutool.core.lang.Validator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.validation.annotation.Validated;

@SpringBootApplication
public class SpringBootHutoolApplication {


    public static void main(String[] args) {
        String strNum = "1230";
        System.out.println(Convert.toInt(strNum));
        Console.log("---------------");
        String strDate = "2019-01-01";
        System.out.println(Convert.toDate(strDate));
        String str = "于大仙";
        System.out.println(Convert.strToUnicode(str));
        Console.log("---------------");
        System.out.println(DateUtil.now());
        DateTime date = DateUtil.date();
        System.out.println(date);

        // 星座
        String zodiac = DateUtil.getZodiac(Month.DECEMBER.getValue(), 10);
        System.out.println(zodiac);

        Validator.isEmail("yudaoyuanma@gmail.com");
    }

}
